﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mysqlx.Crud;
using SqlSugar;

namespace ERPSystem.Common.Domains.PurchaseInvoiceCommon
{
    [SugarTable("PurchaseReturnOrders")]
    public class PurchaseReturnOrder
    {
        /// <summary>
        /// 主键自增
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int PurchaseReturnOrderId { get; set; }
        /// <summary>
        /// 单据编码
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string PurchaseReturnOrderNo { get; set; }
        /// <summary>
        /// 流水号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string PurchaseReturnOrderSerialNumber { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int BusinessType { get; set; }//业务类型
        /// <summary>
        /// 采购单号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string PurchaseOrderNo { get; set; }//采购单号
        /// <summary>
        /// 备注信息
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string DescInfo { get; set; }
        /// <summary>
        /// 单据日期
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? DocumentDate { get; set; }
        /// <summary>
        /// 操作员
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string Operator { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string Supplier { get; set; }
        /// <summary>
        /// 单据状态
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int DocumentsStatus { get; set; }
        /// <summary>
        /// 审核员
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "Nvarchar(50)")]
        public string Audit { get; set; }//审核员 
        /// <summary>
        /// 退货仓库
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int ReturnsWarehouse {  get; set; }
        /// <summary>
        ///业务状态
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int BusinessStatus { get; set; }
        /// <summary>
        /// 审核日期
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? AuditDate { get; set; }
        /// <summary>
        /// 退货原因
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int ReasonForReturn { get; set; }
    }
}
